﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Simple.Repository.Migrations
{
    public partial class _9 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "OrganizationId",
                table: "SysFileInfo",
                type: "char(36)",
                nullable: true,
                comment: "机构Id",
                collation: "ascii_general_ci");

            migrationBuilder.AddColumn<Guid>(
                name: "OrganizationId",
                table: "GardenHouseInfo",
                type: "char(36)",
                nullable: true,
                comment: "机构Id",
                collation: "ascii_general_ci");

            migrationBuilder.AddColumn<Guid>(
                name: "OrganizationId",
                table: "GardenHouseClassRoom",
                type: "char(36)",
                nullable: true,
                comment: "机构Id",
                collation: "ascii_general_ci");

            migrationBuilder.CreateIndex(
                name: "idx_OrganizationId",
                table: "SysFileInfo",
                column: "OrganizationId");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropIndex(
                name: "idx_OrganizationId",
                table: "SysFileInfo");

            migrationBuilder.DropColumn(
                name: "OrganizationId",
                table: "SysFileInfo");

            migrationBuilder.DropColumn(
                name: "OrganizationId",
                table: "GardenHouseInfo");

            migrationBuilder.DropColumn(
                name: "OrganizationId",
                table: "GardenHouseClassRoom");
        }
    }
}
